<?php
namespace app\command;

use app\common\shopify\OrderService;
use think\console\Command;
use think\console\Input;
use think\console\Output;
use think\facade\Db;
use think\facade\Log;

class OrderSyncFromShopify extends Command
{
    protected function configure()
    {
        $this->setName('order:syncFromShopify')
            ->setDescription('同步Shopify订单数据');
    }
    // 主执行逻辑
    protected function execute(Input $input, Output $output)
    {
        // 解除脚本限制
        set_time_limit(0);
        ini_set('memory_limit', '-1');
        $output->writeln('开始同步订单数据...');
        (new OrderService())->syncOrders(10);
        $output->writeln('结束同步订单数据...');
    }

    }